//
//  KEAlphabetWords.swift
//  KoalaEn
//
//  Created by Wade on 2024/9/10.
//

import Foundation
struct KEAlphabetWords :Codable{
    var letter:String?
    var letter_image:String?
    var words:String?
    var words_zh:String?
    var image:String?
    var audio_zh:String?
    var audio_en:String?
    var isSelect:Bool = false
    var sentence_en:Array<String>?
    var sentence_zh:Array<String>?
    
    init(dictionary: [String: Any]) {
        letter = dictionary["letter"] as? String ?? ""
        letter_image = dictionary["letter_image"] as? String ?? ""
        words = dictionary["words"] as? String ?? ""
        words_zh = dictionary["words_zh"] as? String ?? ""
        image = dictionary["image"] as? String ?? ""
        audio_zh = dictionary["audio_zh"] as? String ?? ""
        audio_en = dictionary["audio_en"] as? String ?? ""
        
        sentence_en = dictionary["sentence_en"] as? Array ?? []
        sentence_zh = dictionary["sentence_zh"] as? Array ?? []
        
       }
    
    init(letter: String? = nil, words: String? = nil, image: String? = nil, isSelect: Bool) {
        self.letter = letter
        self.words = words
        self.image = image
        self.isSelect = isSelect
    }
}
